package com.aidem.onecartoon.modules.article.controller;

import com.aidem.onecartoon.modules.article.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author aosun_wu
 * @date 2021-04-11 18:00
 */
@RestController
@RequestMapping("user")
public class LoginController {

	@Autowired
	private LoginService loginService;

	/**
	 * 登陆
	 * @param type 明文字符串 老师/学生
	 */
	@PostMapping("login")
	public String doLogin(Integer number, String pwd, String type) {
		return loginService.doLogin(number, pwd, type);
	}

}
